package com.zc.app.quartz;


import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.io.Serializable;

/**
 * Created by zc on 2016/12/26.
 */
public class ClusterJob implements Serializable {

    public static int i = 0;

    private static Logger log = LogManager.getLogger(ClusterJob.class);

    public void execute() throws InterruptedException {
        log.info("begin begin begin begin begin begin begin begin ! job = "+ ++i);
        log.info("job = "+i+" is running ");
        for(int j = 1 ; j <= 5;j++){//运行5秒
            System.out.print( j +" ");
            Thread.sleep(1*1000);
        }
        System.out.println();
        log.info("end end end end end end end end end end end end ! job = "+ i);
    }

}
